package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_report table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_report"
 */

public abstract class BaseReport  implements Serializable {

	public static String REF = "Report";
	public static String PROP_MEMBER = "member";
	public static String PROP_STORE = "store";
	public static String PROP_WEBSITE = "website";
	public static String PROP_ORDER = "order";
	public static String PROP_CODE = "code";
	public static String PROP_INTERVENE = "intervene";
	public static String PROP_STATUS = "status";
	public static String PROP_END_DATE = "endDate";
	public static String PROP_REPORT_TYPE = "reportType";
	public static String PROP_START_DATE = "startDate";
	public static String PROP_PLAT_REPLY = "platReply";
	public static String PROP_ID = "Id";
	public static String PROP_REPLY = "reply";
	public static String PROP_REASON = "reason";


	// constructors
	public BaseReport () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseReport (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseReport (
		java.lang.Long id,
		com.jspgou.cms.entity.ReportType reportType,
		com.jspgou.cms.entity.Order order,
		com.jspgou.cms.entity.Store store,
		com.jspgou.core.entity.Website website,
		com.jspgou.cms.entity.ShopMember member,
		java.lang.String code,
		java.util.Date startDate,
		boolean intervene,
		java.lang.Integer status) {

		this.setId(id);
		this.setReportType(reportType);
		this.setOrder(order);
		this.setStore(store);
		this.setWebsite(website);
		this.setMember(member);
		this.setCode(code);
		this.setStartDate(startDate);
		this.setIntervene(intervene);
		this.setStatus(status);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.String code;
	private java.lang.String reason;
	private java.util.Date startDate;
	private java.util.Date endDate;
	private java.lang.String reply;
	private boolean intervene;
	private java.lang.String platReply;
	private java.lang.Integer status;

	// many to one
	private com.jspgou.cms.entity.ReportType reportType;
	private com.jspgou.cms.entity.Order order;
	private com.jspgou.cms.entity.Store store;
	private com.jspgou.core.entity.Website website;
	private com.jspgou.cms.entity.ShopMember member;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="report_id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: code
	 */
	public java.lang.String getCode () {
		return code;
	}

	/**
	 * Set the value related to the column: code
	 * @param code the code value
	 */
	public void setCode (java.lang.String code) {
		this.code = code;
	}


	/**
	 * Return the value associated with the column: reason
	 */
	public java.lang.String getReason () {
		return reason;
	}

	/**
	 * Set the value related to the column: reason
	 * @param reason the reason value
	 */
	public void setReason (java.lang.String reason) {
		this.reason = reason;
	}


	/**
	 * Return the value associated with the column: startDate
	 */
	public java.util.Date getStartDate () {
		return startDate;
	}

	/**
	 * Set the value related to the column: startDate
	 * @param startDate the startDate value
	 */
	public void setStartDate (java.util.Date startDate) {
		this.startDate = startDate;
	}


	/**
	 * Return the value associated with the column: endDate
	 */
	public java.util.Date getEndDate () {
		return endDate;
	}

	/**
	 * Set the value related to the column: endDate
	 * @param endDate the endDate value
	 */
	public void setEndDate (java.util.Date endDate) {
		this.endDate = endDate;
	}


	/**
	 * Return the value associated with the column: reply
	 */
	public java.lang.String getReply () {
		return reply;
	}

	/**
	 * Set the value related to the column: reply
	 * @param reply the reply value
	 */
	public void setReply (java.lang.String reply) {
		this.reply = reply;
	}


	/**
	 * Return the value associated with the column: intervene
	 */
	public boolean getIntervene () {
		return intervene;
	}

	/**
	 * Set the value related to the column: intervene
	 * @param intervene the intervene value
	 */
	public void setIntervene (boolean intervene) {
		this.intervene = intervene;
	}


	/**
	 * Return the value associated with the column: platReply
	 */
	public java.lang.String getPlatReply () {
		return platReply;
	}

	/**
	 * Set the value related to the column: platReply
	 * @param platReply the platReply value
	 */
	public void setPlatReply (java.lang.String platReply) {
		this.platReply = platReply;
	}


	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.Integer getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.Integer status) {
		this.status = status;
	}


	/**
	 * Return the value associated with the column: type_id
	 */
	public com.jspgou.cms.entity.ReportType getReportType () {
		return reportType;
	}

	/**
	 * Set the value related to the column: type_id
	 * @param reportType the type_id value
	 */
	public void setReportType (com.jspgou.cms.entity.ReportType reportType) {
		this.reportType = reportType;
	}


	/**
	 * Return the value associated with the column: order_id
	 */
	public com.jspgou.cms.entity.Order getOrder () {
		return order;
	}

	/**
	 * Set the value related to the column: order_id
	 * @param order the order_id value
	 */
	public void setOrder (com.jspgou.cms.entity.Order order) {
		this.order = order;
	}


	/**
	 * Return the value associated with the column: store_id
	 */
	public com.jspgou.cms.entity.Store getStore () {
		return store;
	}

	/**
	 * Set the value related to the column: store_id
	 * @param store the store_id value
	 */
	public void setStore (com.jspgou.cms.entity.Store store) {
		this.store = store;
	}


	/**
	 * Return the value associated with the column: website_id
	 */
	public com.jspgou.core.entity.Website getWebsite () {
		return website;
	}

	/**
	 * Set the value related to the column: website_id
	 * @param website the website_id value
	 */
	public void setWebsite (com.jspgou.core.entity.Website website) {
		this.website = website;
	}


	/**
	 * Return the value associated with the column: member_id
	 */
	public com.jspgou.cms.entity.ShopMember getMember () {
		return member;
	}

	/**
	 * Set the value related to the column: member_id
	 * @param member the member_id value
	 */
	public void setMember (com.jspgou.cms.entity.ShopMember member) {
		this.member = member;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.Report)) return false;
		else {
			com.jspgou.cms.entity.Report report = (com.jspgou.cms.entity.Report) obj;
			if (null == this.getId() || null == report.getId()) return false;
			else return (this.getId().equals(report.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}